<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

<h:form id="add_dialog_form">
    <p:dialog id="add_dialog" widgetVar="add_dialog" modal="true" closable="true">
        <h:panelGrid id="add_grid" columns="2">
            <h:panelGrid id="name_grid">
                <p:outputLabel id="name_label" for="name_input" value="Name"/>
                <p:inputText id="name_input" value="#{supplierTableBean.name}" required="true" />
                <h:message for="name_input"/>
            </h:panelGrid>
            <h:panelGrid id="description_grid">
                <p:outputLabel id="description_label" for="description_input"  value="description"/>
                <p:inputText id="description_input" value="#{supplierTableBean.information}" required="true"/>
                <h:message for="description_input"/>
            </h:panelGrid>
        </h:panelGrid>
        <p:commandButton id="save" value="Save" actionListener="#{supplierTableBean.save}" update="add_dialog_form:add_grid" ajax="true"/>
    </p:dialog>
</h:form>
</html>